       package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * RcEspecifAdvalor generated by hbm2java
 */
@Entity
@Table(name = "RC_ESPECIF_ADVALOR", schema = "RUC")
public class RcEspecifAdvalor implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1720676179465090936L;
	private RcEspecifAdvalorId id;
	private TbRepresentante tbRepresentante;
	private Date ftramite;
	private String cunidad;
	private String cusuario;
	private String nitRepresentante;
	private Date fhingreso;
	private Set<RcEspecAdvalDet> rcEspecAdvalDets = new HashSet<RcEspecAdvalDet>(
			0);

	public RcEspecifAdvalor() {
	}

	public RcEspecifAdvalor(RcEspecifAdvalorId id, Date ftramite,
			String cunidad, String cusuario, Date fhingreso, String nitRepresentante) {
		this.id = id;
		this.ftramite = ftramite;
		this.cunidad = cunidad;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.nitRepresentante = nitRepresentante;
	}

	public RcEspecifAdvalor(RcEspecifAdvalorId id,
			TbRepresentante tbRepresentante, Date ftramite, String cunidad,
			String cusuario, Date fhingreso,
			Set<RcEspecAdvalDet> rcEspecAdvalDets,String nitRepresentante ) {
		this.id = id;
		this.tbRepresentante = tbRepresentante;
		this.ftramite = ftramite;
		this.cunidad = cunidad;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.rcEspecAdvalDets = rcEspecAdvalDets;
		this.nitRepresentante = nitRepresentante;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "nit", column = @Column(name = "NIT", nullable = false, length = 14)),
			@AttributeOverride(name = "nfolio", column = @Column(name = "N_FOLIO", nullable = false, length = 14)) })
	public RcEspecifAdvalorId getId() {
		return this.id;
	}

	public void setId(RcEspecifAdvalorId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "C_REPRESENTANTE")
	public TbRepresentante getTbRepresentante() {
		return this.tbRepresentante;
	}

	public void setTbRepresentante(TbRepresentante tbRepresentante) {
		this.tbRepresentante = tbRepresentante;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "F_TRAMITE", nullable = false, length = 7)
	public Date getFtramite() {
		return this.ftramite;
	}

	public void setFtramite(Date ftramite) {
		this.ftramite = ftramite;
	}

	@Column(name = "C_UNIDAD", nullable = false, length = 5)
	public String getCunidad() {
		return this.cunidad;
	}

	public void setCunidad(String cunidad) {
		this.cunidad = cunidad;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "rcEspecifAdvalor")
	public Set<RcEspecAdvalDet> getRcEspecAdvalDets() {
		return this.rcEspecAdvalDets;
	}

	public void setRcEspecAdvalDets(Set<RcEspecAdvalDet> rcEspecAdvalDets) {
		this.rcEspecAdvalDets = rcEspecAdvalDets;
	}
	@Column(name = "NIT_REPRESENTANTE", nullable = true, length = 14)
	public String getNitRepresentante() {
		return this.nitRepresentante;
	}

	public void setNitRepresentante(String nitRepresentante) {
		this.nitRepresentante = nitRepresentante;
	}

}
